import { pushResponseInterceptor } from 'lfun-bg-comp';

pushResponseInterceptor('get:/school/v1/teachers/page', r => {
  return {
    has_next: false,
    has_prev: false,
    page: 1,
    pages: 1,
    per_page: 10,
    total: 3,
    items: [
      {
        key: 1,
        teacher_base_id: 3,
        teacher_id: 3,
        teacher_name: '张三g',
        teacher_id_number: '310101202001011511',
        teacher_gender: 'female',
        teacher_employer: 9,
        highest_education: 'postgraduate_education,doctoral_student_graduation',
        political_status: 'CPC_Member',
        in_post: false,
        employment_form: 'personnel_agent',
        enter_school_time: '2010-01-01',
        school_name: '长风公园实验幼儿园',
        teacher_status: 'normal',
      },
      {
        key: 2,
        teacher_base_id: 2,
        teacher_id: 2,
        teacher_name: '王五',
        teacher_id_number: '45203569326',
        teacher_gender: 'male',
        teacher_employer: 11,
        highest_education: '',
        political_status: '党员',
        in_post: true,
        employment_form: '合同',
        enter_school_time: '2010-01-01',
        school_name: '大渡河二院',
        teacher_status: 'normal',
      },
      {
        key: 3,
        teacher_base_id: 1,
        teacher_id: 1,
        teacher_name: '李思',
        teacher_id_number: '562363230',
        teacher_gender: 'male',
        teacher_employer: 11,
        highest_education: '',
        political_status: '党员',
        in_post: true,
        employment_form: '合同',
        enter_school_time: '2010-01-01',
        school_name: '大渡河二院',
        teacher_status: 'change',
      },
    ],
  };
});

pushResponseInterceptor('get:/school/v1/teacher-transaction/transfer-out-launch', r => {
  return {
    has_next: false,
    has_prev: false,
    page: 1,
    pages: 1,
    per_page: 10,
    total: 3,
    items: [
      {
        teacher_name: '张三',
        teacher_number: '2324',
        teacher_id_type: '',
        teacher_id_number: '',
        teacher_gender: '',
        original_unit: '',
        approval_name: '',
        approval_status: 'pending',
        operation_time: '',
        approval_time: '',
        teacher_id: 3,
        id: 1,
      },
      {
        teacher_name: '张三',
        teacher_number: '2324',
        teacher_id_type: '',
        teacher_id_number: '',
        teacher_gender: '',
        original_unit: '',
        approval_name: '',
        approval_status: 'revoked',
        operation_time: '',
        approval_time: '',
        teacher_id: 3,
        id: 1,
      },
    ],
  };
});

pushResponseInterceptor('get:/school/v1/teacher-transaction/transfer-in-launch', r => {
  return {
    has_next: false,
    has_prev: false,
    page: 1,
    pages: 1,
    per_page: 10,
    total: 3,
    items: [
      {
        teacher_name: '张三',
        teacher_number: '2324',
        teacher_id_type: '',
        teacher_id_number: '',
        teacher_gender: '',
        original_unit: '',
        approval_name: '',
        approval_status: 'pending',
        operation_time: '',
        approval_time: '',
        teacher_id: 3,
        id: 1,
      },
      {
        teacher_name: '张三',
        teacher_number: '2324',
        teacher_id_type: '',
        teacher_id_number: '',
        teacher_gender: '',
        original_unit: '',
        approval_name: '',
        approval_status: 'revoked',
        operation_time: '',
        approval_time: '',
        teacher_id: 3,
        id: 1,
      },
    ],
  };
});

pushResponseInterceptor('get:/', r => {
  return {
    has_next: false,
    has_prev: false,
    page: 1,
    pages: 1,
    per_page: 10,
    total: 5,
    items: [
      {
        teacher_base_id: 4,
        teacher_id: 32,
        teacher_name: '朱重一',
        teacher_id_number: '310101202001011511',
        teacher_gender: 'male',
        teacher_employer: 1,
        highest_education: 'postgraduate_education,doctoral_student_graduation',
        political_status: 'CPC_Member',
        employment_form: 'personnel_agent',
        enter_school_time: '2024-02-24',
        teacher_main_status: 'unemployed',
        in_post: false,
        school_name: '沈阳第一实验幼儿园总校',
        teacher_approval_status: 'submitting',
      },
      {
        teacher_base_id: 3,
        teacher_id: 31,
        teacher_name: '朱一',
        teacher_id_number: '310101202001011511',
        teacher_gender: 'male',
        teacher_employer: 1,
        highest_education: 'postgraduate_education,doctoral_student_graduation',
        political_status: 'CPC_Member',
        employment_form: 'personnel_agent',
        enter_school_time: '2024-02-20',
        teacher_main_status: 'unemployed',
        in_post: false,
        school_name: '沈阳第一实验幼儿园总校',
        teacher_approval_status: 'submitting',
      },
      {
        teacher_base_id: 2,
        teacher_id: 3,
        teacher_name: '朱朱',
        teacher_id_number: '310101202001011511',
        teacher_gender: 'female',
        teacher_employer: 1,
        highest_education: '',
        political_status: '',
        employment_form: '',
        enter_school_time: null,
        teacher_main_status: 'unemployed',
        in_post: false,
        school_name: '沈阳第一实验幼儿园总校',
        teacher_approval_status: 'submitting',
      },
      {
        teacher_base_id: 1,
        teacher_id: 2,
        teacher_name: '朱重',
        teacher_id_number: '310101202001011511',
        teacher_gender: 'male',
        teacher_employer: 1,
        highest_education: 'postgraduate_education,doctoral_student_graduation',
        political_status: 'CPC_Member',
        employment_form: 'personnel_agent',
        enter_school_time: '2024-02-14',
        teacher_main_status: 'unemployed',
        in_post: false,
        school_name: '沈阳第一实验幼儿园总校',
        teacher_approval_status: 'submitting',
      },
      {
        teacher_base_id: 0,
        teacher_id: 1,
        teacher_name: '朱重八',
        teacher_id_number: '310101202001011511',
        teacher_gender: 'male',
        teacher_employer: 1,
        highest_education: '',
        political_status: '',
        employment_form: '',
        enter_school_time: null,
        teacher_main_status: 'unemployed',
        in_post: false,
        school_name: '沈阳第一实验幼儿园总校',
        teacher_approval_status: 'submitting',
      },
    ],
  };
});

// pushResponseInterceptor('put:/school/v1/teachers/teacher', r => {
//   return {
//     error_code: 'VALIDATION_ERROR',
//     message: '输入验证失败',
//     user_message: '输入信息中有一些无效的值',
//     details: {
//       fields: [
//         {
//           type: 'string_too_short',
//           loc: ['province'],
//           msg: 'String should have at least 1 character',
//           input: '',
//           ctx: {
//             min_length: 1,
//           },
//           url: 'https://errors.pydantic.dev/2.7/v/string_too_short',
//         },
//         {
//           type: 'string_too_short',
//           loc: ['city'],
//           msg: 'String should have at least 1 character',
//           input: '',
//           ctx: {
//             min_length: 1,
//           },
//           url: 'https://errors.pydantic.dev/2.7/v/string_too_short',
//         },
//       ],
//     },
//     stack: null,
//   };
// });
